#include "eetc.h"

/* at the end we should generate something like this:
 * Eet_Data_Descriptor *edd;
 * Eet_Data_Descriptor_Class eddc;
 *
 * eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc), "Eshm_Message_Segment_New", sizeof(Eshm_Message_Segment_New));
 * edd = eet_data_descriptor_stream_new(&eddc);
 * _descriptors[INDEX(ESHM_MSG_SEGMENT_NEW)] = edd;
 * EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Eshm_Message_Segment_New, "id", id, EET_T_INLINED_STRING);
 * EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Eshm_Message_Segment_New, "size", size, EET_T_UINT);
 * so we basically need a way to make the grammar/lexer generate an ordered
 * list of descriptors and for each of them create the above code
 *
 */

Eina_List *descriptors = NULL;
Eina_Hash *types = NULL;

int main(int argc, char **argv)
{
	extern FILE *yyin;

	eina_init();
	eet_init();

	types = eina_hash_string_superfast_new(NULL);

	yyin = fopen(argv[1], "r");
	yyparse();
	/* iterate over the list of descriptors and dump them to stdout */
	fclose(yyin);

	eina_shutdown();
	eet_shutdown();

	return 0;
}
